package cn.edu.njtc.entity.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.io.Serializable;

@Data
@Schema(description = "医生新增请求DTO")
public class DoctorAddDTO implements Serializable {

    @NotBlank(message = "医生姓名不能为空")
    @Size(max = 50, message = "医生姓名长度不能超过50个字符")
    @Schema(description = "医生姓名", example = "张医生")
    private String name;

    @NotBlank(message = "手机号码不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号码格式不正确")
    @Schema(description = "医生手机号", example = "13800000001")
    private String phone;

    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 20, message = "密码长度需在6-20个字符之间")
    @Schema(description = "医生登录密码", example = "password123")
    private String password;

    @NotNull(message = "所属医院ID不能为空")
    @Schema(description = "所属医院ID", example = "1")
    private Integer hospitalId;

    @NotBlank(message = "医生职称不能为空")
    @Size(max = 50, message = "医生职称长度不能超过50个字符")
    @Schema(description = "医生职称", example = "主任医师")
    private String level;

    @Size(max = 1000, message = "医生介绍长度不能超过1000个字符")
    @Schema(description = "医生简历或介绍", example = "擅长癫痫病的诊断和治疗。")
    private String doctorIntroduction;

    @Schema(description = "从医经验年限", example = "15")
    private Integer experienceYears;

    @Size(max = 255, message = "擅长领域长度不能超过255个字符")
    @Schema(description = "擅长领域", example = "癫痫,脑血管病")
    private String specialties;
}